﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using MediaBrowserSL.BOL;
using MediaBrowserSL.Services;

namespace MediaBrowserSL.IServices
{
    [ServiceContract]
    public interface IMediaService
    {
        [OperationContract]
        [FaultContract(typeof(ErrorDataContract))]
        IEnumerable<Media> GetListMediasByCategory(int idUser, int idCategory);

        [OperationContract]
        [FaultContract(typeof(ErrorDataContract))]
        Media CreateMedia(Media m, User u);

        [OperationContract]
        [FaultContract(typeof(ErrorDataContract))]
        void UpdateMedia(Media m);

        [OperationContract]
        [FaultContract(typeof(ErrorDataContract))]
        void DeleteMedia(Media m, User u);

        [OperationContract]
        [FaultContract(typeof(ErrorDataContract))]
        Media CreateMediaItem(Media mediaItem, Media mediaParent, User u);

        [OperationContract]
        [FaultContract(typeof(ErrorDataContract))]
        IEnumerable<String> GenerateImagesFromPdfBook(String urlPdfBook, User u);

        [OperationContract]
        [FaultContract(typeof(ErrorDataContract))]
        Dictionary<int, double> GetSize(User u);
        
    }
}